package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
public class ProductController {
   // @RequestMapping("/getProducts")
    //public void getProducts(String[] proIds) {
     //   for (String proId:proIds) {
     //       System.out.println("获取到了Id为"+proId+ "的商品");
  //      }
   // }



    @RequestMapping("/getProducts")
    public void getProducts(@RequestParam("proIds") List<String> proIds) {
        for (String proId:proIds) {
            System.out.println("获取到了Id为"+proId+ "的商品");
        }
    }
}

